<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品详情</title>
    <style>
        body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

hr {
    border: 0;
    height: 1px;
    background-color: #ccc;
    margin: 20px 0;
}

a {
    text-decoration: none;
    color: #007bff;
}

a:hover {
    text-decoration: underline;
}
</style>
</head>
<body>
    <h2>商品详情</h2>
    <hr>
    <p>名称：{{product.name}}</p>
    <p>价格：{{product.price}}</p>
    <p>描述：{{product.description}}</p>
    <p>数量库存：{{product.stock}}</p>

    <form action="{% url 'product:product_add' product.id %}" method="post">
        {% csrf_token %}
        <p>添加数量：<input type="text" name="num"></p>
        <button type="submit">添加</button>
    </form>
</body>
</html>